#include "std_msgs/String.h"
#include "ros/ros.h"

int main(int argc,char **argv){
    ros::init(argc,argv,"test_io_node");
    ros::NodeHandle n;

    ros::Publisher pub=n.advertise<std_msgs::String>("send_info",1);

    while(ros::ok()){
        std::string s;
        std::cout<<"Enter a msg:\n";
        std::cin>>s;
        ROS_INFO(" ");
        std_msgs::String msg;
        msg.data=s;
        pub.publish(msg);
        ros::spinOnce();
    }
}